<template>
  <div class="main">
    <a-affix :offset-top="66">
      <div
        class="banner"
        :style="{
          background: 'url(' + require('@/assets/tech/techHead.png') + ')',
          height: '80px',
          backgroundSize: 'cover',
        }"
      >
        <div class="title-box">
          <p class="title">工程技术/经验库</p>
        </div>
      </div>
    </a-affix>
    <FixedMenu menuClass="fixed-menu">
      <div class="fixed-menu">
        <div v-has="'technologyLib:add'" class="functionMould" style="background-color: #ffffff" @click="doAdd">
          <a-icon type="file-add" class="menu-icon" />
          <span> 新建文档</span>
        </div>
        <div class="functionMould" style="background-color: #ffffff" @click="handleMyFile(1)">
          <a-icon type="file-text" class="menu-icon" />
          <span> 我的文档</span>
        </div>

        <div class="functionMould" style="background-color: #ffffff" @click="handleMyFile(2)">
          <a-icon type="lock" class="menu-icon" />
          <span>我引用的</span>
        </div>
        <div class="functionMould" style="background-color: #ffffff" @click="handleMyFile(3)">
          <a-icon type="lock" class="menu-icon" />
          <span>我审批的</span>
        </div>
        <div class="functionMould" style="background-color: #ffffff" @click="handlehToQuote">
          <a-icon type="history" class="menu-icon" />
          <span> 申请记录</span>
        </div>
        <div class="functionMould" style="background-color: #ffffff" @click="handlehToComments">
          <a-icon type="history" class="menu-icon" />
          <span> 点评记录</span>
        </div>
      </div>
    </FixedMenu>
    <div class="container">
      <div class="trademark-nav" :class="{ 'trademark-nav-hidden': showMore }">
        <div class="projec-class-box clearFix projec-class-input">
          <div style="display: flex; justify-content: space-between">
            <div style="display: flex; justify-content: flex-start">
              <div class="projec-class-lable" style="float: left">技术/经验类别</div>
              <ul class="projec-class-list clearFix">
                <li
                  @click="ToggleSelectType(null, 'techCategory')"
                  style="cursor: pointer"
                  :class="!searchForm.techCategory ? 'active2' : ''"
                >
                  全部
                </li>
                <li
                  style="cursor: pointer"
                  @click="ToggleSelectType(v.code, 'techCategory')"
                  v-for="(v, i) in codes['技术库-技术类别（专业）']"
                  :key="i"
                  :class="searchForm.techCategory == v.code ? 'active2' : ''"
                >
                  {{ v.name }}
                </li>
              </ul>
            </div>
            <div style="display: flex; justify-content: end; align-items: center; font-weight: normal; color: #3168b1">
              <div style="margin-right: 10px;cursor:pointer" @click="ToggleSelectType(-1, 'status')">
                {{ '技术/经验总数：' + searchForm.total }}
              </div>
              <div
                v-for="(item, index) in codes['工程技术库状态']"
                :key="index"
                style="margin-right: 10px;cursor:pointer"
                @click="ToggleSelectType(item.code, 'status')"
              >
                {{ item.name + '：' + (statusCount[item.code] ? statusCount[item.code] : 0) }}
              </div>
              <div style="margin-right: 10px;cursor:pointer" @click="ToggleSelectType(!searchForm.quote, 'quote')">
                {{ '引用数量：' + quoteCount }}
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="trademark-tap">
        <span @click="showMore = !showMore"
          >全部{{ !showMore ? '收起' : '展开' }}
          <a-icon :class="['icon-child-down', { 'icon-child-up': showMore }]" slot="suffixIcon" type="caret-up" />
        </span>
      </div>
      <div class="data-main" :class="{ shrinkage: shrinkageFlag }">
        <div class="box-left ant-table-scroll">
          <div class="tree-title">
            <span class="bold">目录</span>
            <a-icon
              type="menu-fold"
              @click="shrinkageFlag = !shrinkageFlag"
              :title="!shrinkageFlag ? '收缩目录' : '展开目录'"
            />
          </div>
          <div class="leftTree" v-if="!shrinkageFlag">
            <div v-for="(item, index) in codes['技术库-类型']" :key="index" @click="onSelectClass(item)">
              <div style="padding-left: 10px; cursor: pointer; color: white" v-if="searchForm.techType == item.code">
                <a-badge color="green" v-if="searchForm.techType == item.code" />
                <a-badge color="gold" v-else />
                {{ item.parentid }}
              </div>
              <div style="padding-left: 10px; cursor: pointer" v-else>
                <a-badge color="gold" />
                {{ item.parentid }}
              </div>
            </div>
          </div>
        </div>
        <div class="box-right">
          <div class="main-top">
            <div>
              <a-checkbox
                :indeterminate="indeterminate"
                :checked="checkAll"
                @change="onCheckAllChange"
                v-if="typeFlag != 'list'"
              >
                全选
              </a-checkbox>
              <a-button type="primary" @click="handleMyFile(0)" style="margin-left: 8px">全部</a-button>
              <a-button type="primary" @click="doAdd" style="margin-left: 8px">新增</a-button>
              <a-button
                v-if="permissions.indexOf('PROJECT_TECH_ENGINEE_MANAGER') > -1"
                @click="totechKeyWordTree('技术库-类型')"
                style="margin-left: 10px"
                >类型维护
              </a-button>
              <a-button :loading="exportLoading" icon="download" @click="handleExportExcel">导出</a-button>

              <a-input-group compact>
                <a-input-search
                  :allowClear="true"
                  placeholder="按文件名称、文件编号、关键词模糊查询"
                  @change="onSearch"
                  v-model="searchForm.keyword"
                  @search="onSearch"
                />
              </a-input-group>
              <a-button icon="star" @click="openSearchForm">高级查询</a-button>
            </div>
            <div class="right-side">
              <div :class="{ active: typeFlag === 'list' }" @click="typeFlag = 'list'"><a-icon type="bars" />列表</div>
              <div :class="{ active: typeFlag === 'card' }" @click="typeFlag = 'card'">
                <a-icon type="appstore" />卡片
              </div>
            </div>
          </div>
          <div :class="['main-table', `project-${typeFlag}`]">
            <a-spin :spinning="loading">
              <a-table
                v-if="typeFlag == 'list'"
                :scroll="{ x: 1200 }"
                :columns="columns"
                :data-source="fileList"
                rowKey="id"
                bordered
                :pagination="false"
                :rowClassName="rowClassName"
                :customRow="customRow"
                size="small"
                :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
              >
                <template slot="actionRender" slot-scope="text, record">
                  <div style="display: flex; justify-content: space-around; cursor: pointer">
                    <div style="margin-left: 25px; cursor: pointer" @click="openQuotes(record)">
                      引用:{{ '(' + record.quoteTimes + ')' }}
                    </div>
                    <div style="margin-left: 25px; cursor: pointer" @click="openComments(record)">
                      点评:{{ '(' + record.commentsTimes + ')' }}
                    </div>
                  </div>
                </template>
              </a-table>
              <div v-else>
                <a-checkbox-group v-model="selectedRowKeys">
                  <a-empty v-if="fileList.length == 0 && !loading" />
                  <section v-for="item of fileList" :key="item.id">
                    <div class="list-head">
                      <div style="color: #02a7f0" class="left">
                        <a-checkbox :value="item.id"></a-checkbox>

                        <span class="font-active list-title" @click="doDetail(item)" :title="item.techNo">{{
                          item.techNo
                        }}</span>
                        <span class="font-active list-title" @click="doDetail(item)" :title="item.techName">{{
                          item.techName
                        }}</span>
                      </div>
                      <div class="right">
                        <span>
                          <span style="font-weight: normal">发布时间:{{ item.publishTime || '未发布' }}</span>
                        </span>
                      </div>
                    </div>
                    <div class="list-content">
                      <div class="left">
                        <div style="margin-right: 25px">编制人:{{ item.compileUser }}</div>
                        <div style="margin-right: 25px">发布部门:{{ item.createUserDept }}</div>
                        <div style="margin-right: 25px">发布时间:{{ item.publishTime || '未发布' }}</div>
                        <div style="margin-right: 25px">技术/经验等级:{{ item.techLevel }}</div>
                        <div style="margin-right: 25px">
                          技术/经验形式:{{ getCodeNames(item.fileType, '技术库-文件形式') }}
                        </div>
                      </div>
                      <div class="right" style="color: #02a7f0">
                        <div style="margin-left: 25px; cursor: pointer" @click="openQuotes(item)">
                          引用:{{ '(' + item.quoteTimes + ')' }}
                        </div>
                        <div style="margin-left: 25px; cursor: pointer" @click="openComments(item)">
                          点评:{{ '(' + item.commentsTimes + ')' }}
                        </div>
                      </div>
                    </div>
                  </section>
                </a-checkbox-group>
              </div>
              <div class="right">
                <a-pagination
                  v-model="searchForm.current"
                  size="small"
                  show-size-changer
                  :showTotal="searchForm.showTotal"
                  :page-size.sync="searchForm.pageSize"
                  :total="searchForm.total"
                  :pageSizeOptions="searchForm.pageSizeOptions"
                  @change="pageChange"
                  @showSizeChange="onShowSizeChange"
                />
              </div>
            </a-spin>
          </div>
        </div>
      </div>
    </div>
    <div class="app-box-outter"></div>
    <a-modal
      :visible="showSearchForm"
      width="70vw"
      :bodyStyle="{ padding: '10px' }"
      title="高级查询"
      @ok="
        showSearchForm = false
        onSearch()
      "
      @cancel="showSearchForm = false"
    >
      <a-form-model ref="ruleForm" :label-col="labelCol" :wrapper-col="wrapperCol">
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item label="状态">
              <a-select style="width: 100%" v-model="searchForm.status">
                <a-select-option value="-1">全部</a-select-option>
                <a-select-option v-for="d in codes['工程技术库状态']" :value="d.code" :key="d.code"
                  >{{ d.name }}
                </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="技术/经验编号">
              <a-input v-model="searchForm.techNo" allowclear />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="技术/经验名称">
              <a-input v-model="searchForm.techName" allowclear />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-model-item label="项目编号">
              <a-input v-model="searchForm.projectNo" allowclear />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="技术/经验类别">
              <a-select style="width: 100%" v-model="searchForm.techCategory">
                <a-select-option value="">全部</a-select-option>
                <a-select-option v-for="d in codes['技术库-技术类别（专业）']" :value="d.code" :key="d.code"
                  >{{ d.name }}
                </a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="项目经理">
              <a-input v-model="searchForm.projectManager" allowclear />
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-form-model>
    </a-modal>
    <QuoteListModal ref="QuoteListModal" />
    <CommentsListModal ref="CommentsListModal" />
    <TCodeInfoListModal :type="editCodeType" ref="TCodeInfoListModal" />
  </div>
</template>

<script>
import { getAction,postAction } from '@/api/manage'
import { formatDate } from '@/utils/util'
import { ResizeHandleMoreMixin } from '@/mixins/ResizeHandleMoreMixin'
import FixedMenu from '@/components/tools/FixedMenu'
import { UtilsMixin } from '@/mixins/UtilsMixin'
import { TableMixin } from '@/mixins/TableMixin'
import { CodesMixin } from '@/mixins/CodesMixin'
const rowSelection = {
  onChange: (selectedRowKeys, selectedRows) => {
    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
  },
  onSelect: (record, selected, selectedRows) => {
    console.log(record, selected, selectedRows)
  },
  onSelectAll: (selected, selectedRows, changeRows) => {
    console.log(selected, selectedRows, changeRows)
  },
}
export default {
  name: 'Technology',
  components: {
    FixedMenu,
    QuoteListModal: () => import('@/views/tech/enginee/quote/QuoteListModal.vue'),
    CommentsListModal: () => import('@/views/tech/enginee/comments/CommentsListModal.vue'),
    TCodeInfoListModal: () => import('@/views/system/TCodeInfoListModal.vue'),
  },
  mixins: [ResizeHandleMoreMixin, CodesMixin, TableMixin, UtilsMixin],
  props: {
    parentId: {
      default: null,
    },
  },
  data() {
    return {
      typeFlag: 'card', // 默认横向
      forecast: [],
      showMore: false,
      indeterminate: false,
      checkAll: false,
      plainOptions: [],
      cityData: [],
      searchTab: {},

      // parentId: this.$route.params && this.$route.params.id, //库id
      searchForm: {
        current: 1,
        pageSize: 10,
        pageSizeOptions: ['10', '30', '50', '100'],
        showTotal: (total, range) => {
          return range[0] + '-' + range[1] + ' 共' + total + '条'
        },
        status: '-1',
        quote: false,
      },
      loading: false,
      treeData: [],
      treeDataShow: [],
      fileList: [],
      selectedRowKeys: [],
      loading: false,
      treeSelectedKeys: ['-1'],
      url: {
        list: '/hteEngineeTechLib/page',
        statusCount: '/hteEngineeTechLib/statusCount',
        quoteCount: '/hteEngineeTechLib/quoteCount',
        exportDynamicExcel: '/hteEngineeTechLib/export',
        myPermission: '/upms/user/getAllPermissionValues',
      },
      userinfo: {
        info: this.$store.getters.userInfo,
        module: 'home',
        badgecount: '',
      },

      showSearchForm: false,
      labelCol: { span: 8 },
      wrapperCol: { span: 15 },
      ////////////////////////////
      quoteCount: 0,
      statusCount: {},
      rowSelection,
      shrinkageFlag: false,
      exportLoading: false,
      columns: [
        {
          title: '序号',
          dataIndex: '',
          key: 'rowIndex',
          width: '45px',
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
        },
        {
          title: '项目号',
          align: 'center',
          width: '100px',
          dataIndex: 'projectNo',
          customCell: () => {
            return this.customCellRender(100)
          },
          customRender: (text, record) => {
            return this.tooltipRender(text, record)
          },
        },
        {
          title: '技术/经验编号',
          align: 'center',
          width: '150px',
          dataIndex: 'techNo',
          customCell: () => {
            return this.customCellRender(150)
          },
          customRender: (text, record) => {
            return this.tooltipActiveRender(text, record, 'doDetail')
          },
        },
        {
          title: '技术/经验类别(专业)',
          align: 'center',
          width: '120px',
          dataIndex: 'techCategory',
          customCell: () => {
            return this.customCellRender(120)
          },
          customRender: (text, record) => {
            return this.tooltipRender(this.getCodeNames(text, '技术库-技术类别（专业）'), record)
          },
        },
        {
          title: '技术/经验名称',
          align: 'center',
          width: '250px',
          dataIndex: 'techName',
          customCell: () => {
            return this.customCellRender(250)
          },
          customRender: (text, record) => {
            return this.tooltipRender(text, record)
          },
        },
        {
          title: '技术/经验等级',
          align: 'center',
          width: '100px',
          dataIndex: 'techLevel',
          customCell: () => {
            return this.customCellRender(100)
          },
          customRender: (text, record) => {
            return this.tooltipRender(text, record)
          },
        },
        {
          title: '文件形式',
          align: 'center',
          width: '100px',
          dataIndex: 'fileType',
          customCell: () => {
            return this.customCellRender(100)
          },
          customRender: (text, record) => {
            return this.tooltipRender(this.getCodeNames(text, '技术库-文件形式'), record)
          },
        },
        {
          title: '项目经理',
          align: 'center',
          width: '100px',
          dataIndex: 'projectManager',
          customCell: () => {
            return this.customCellRender(100)
          },
          customRender: (text, record) => {
            return this.tooltipRender(text, record)
          },
        },
        {
          title: '查阅次数',
          align: 'center',
          width: '100px',
          dataIndex: 'viewTimes',
          customCell: () => {
            return this.customCellRender(100)
          },
          customRender: (text, record) => {
            return this.tooltipRender(text, record)
          },
        },
        {
          title: '状态',
          align: 'center',
          width: '100px',
          dataIndex: 'status',
          customCell: () => {
            return this.customCellRender(100)
          },
          customRender: (text, record) => {
            return this.tooltipRender(this.getCodeNames(text, '工程技术库状态'), record)
          },
        },
        {
          title: '操作',
          align: 'center',
          width: '100px',
          dataIndex: 'status',
          customCell: () => {
            return this.customCellRender(100)
          },
          scopedSlots: { customRender: 'actionRender' },
        },
      ],
      editCodeType:"",
      permissions:[]
    }
  },
  computed: {},
  watch: {},
  async mounted() {
    this.searchForm.type="-1";
    this.fetchPermission()
    await this.fetchCodes([
      '工程技术库状态',
      '工程技术库-技术类型',
      '技术库-技术类别（专业）',
      '技术库-文件形式',
      '技术库-类型',
      '工程技术库-技术等级'
    ])
    if (this.codes['技术库-类型']) {
      let codes = this.codes['技术库-类型']
      this.codes['技术库-类型'] = [{ code: '1', parentid: '全部' }, ...codes]
    }
    this.initData()
    this.fetchList('mounted')
  },
  methods: {
    formatDate,
    initData() {},
    handleExportExcel() {
      let url = process.env.VUE_APP_API_BASE_URL + this.url.exportDynamicExcel + '?1=1'
      this.handleExportXls('工程技术库列表', url, this.searchForm)
    },

    ToggleSelectType(code, type) {
      this.searchForm[type] = code
      this.fetchList('ToggleSelectType')
    },

    onCheckAllChange(e) {
      Object.assign(this, {
        selectedRowKeys: e.target.checked ? this.plainOptions : [],
        indeterminate: false,
        checkAll: e.target.checked,
      })
    },
    ///////////////////////////////////////////////////////////////
    
    /**
     * 选择树节点，切换列表数据
     */
    onSelectClass(item, e) {
      if (item.parentid != '全部') {
        this.searchForm['techType'] = item.code
      } else {
        this.searchForm['techType'] = ''
      }
      this.searchForm.pageNo = 1
      this.searchForm.current = 1

      this.fetchList('onSelectClass')
    },
    handleMyFile(type) {
      this.searchForm.pageNo = 1
      this.searchForm.current = 1
      this.searchForm.myType = type
      this.fetchList('handleMyFile')
    },
    onTreenChange(value) {
      this.$forceUpdate()
      this.fetchList('onTreenChange')
    },
    doDetail(record) {
      let urlJump = this.$router.resolve({ path: `/engineeTech/edit?id=` + record.id })
      window.open(urlJump.href, '_blank')
    },
    rowClassName(record) {
      return this.selectedRowKeys.indexOf(record.id) > -1 ? 'blue' : 'white'
    },
    openSearchForm() {
      this.showSearchForm = true
    },
    onSearch() {
      this.showSearchForm = false
      this.fetchList('onSearch')
    },
    handleReload() {
      this.clearQueryParams()
      this.fetchList('handleReload')
    },
    fetchList(type = '') {
      this.loading = true
      this.fileList = []
      const that = this
      postAction(this.url.list, this.searchForm).then((res) => {
        if (res.success) {
          this.selectedRowKeys = []
          this.fileList = res.result.records || res.result
          this.plainOptions = []
          if (res.result.total) {
            that.searchForm.total = res.result.total
          } else {
            that.searchForm.total = 0
          }
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        this.loading = false
      })
      this.fetchStatusCount()
      this.fetchQuoteCount()
    },
    fetchStatusCount() {
      this.fileList = []
      const that = this
      postAction(this.url.statusCount, this.searchForm).then((res) => {
        if (res.success) {
          this.statusCount = res.result
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
      })
    },
    fetchQuoteCount() {
      this.loading = true
      this.fileList = []
      const that = this
      postAction(this.url.quoteCount, this.searchForm).then((res) => {
        if (res.success) {
          this.quoteCount = res.result
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
      })
    },
    doAdd() {
      let urlJump = this.$router.resolve({ path: `/engineeTech/edit` })
      window.open(urlJump.href, '_blank')
    },
    totechKeyWordTree(type) {
      this.editCodeType = type
      this.$refs.TCodeInfoListModal.open(type)
      // let urlJump = this.$router.resolve({ path: `/techKeyWordTree/` + type })
      // window.open(urlJump.href, '_blank')
    },
    handlehToQuote() {
      let conditions = ''
      if (this.selectedRowKeys.length == 1) {
        conditions = '?techNo=' + this.selectedRows[0].techNo
      }
      let urlJump = this.$router.resolve({ path: '/engineeTech/quote/list' + conditions })
      window.open(urlJump.href, '_blank')
    },
    handlehToComments() {
      let conditions = ''
      if (this.selectedRowKeys.length == 1) {
        conditions = '?techNo=' + this.selectedRows[0].techNo
      }
      let urlJump = this.$router.resolve({ path: '/engineeTech/comments/list' + conditions })
      window.open(urlJump.href, '_blank')
    },

    openQuotes(tech) {
      this.$refs.QuoteListModal.open(tech)
    },
    openComments(tech) {
      this.$refs.CommentsListModal.open(tech)
    },
    fetchPermission(){
      getAction(this.url.myPermission, { projectId: -1 }).then((res) => {
        if (res.code == 200) {
          this.permissions = res.result
        } else {
          this.$message.warning('加载权限数据失败:' + res.message)
        }
      })
    }
  }
}
</script>

<style lang="less" scoped>
@import '~@views/library/hteFile.less';
/deep/ .j-table-force-nowrap {
  th {
    white-space: normal !important;
  }
}

.list-header {
  height: 28px;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  padding-left: 10px;

  span,
  a {
    // max-width: 15%;
    display: inline-block;
    font-weight: bold;
    font-size: 15px;
    padding-right: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  a {
    max-width: 70%;
  }
  .status {
    width: 68px;
    padding: 0 7px;
    text-align: center;
    position: absolute;
    right: 0;
    z-index: 999;
    position: absolute;
  }
}
/deep/ .list-content {
  .ant-col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    text-align: left;
    padding-left: 10px;
  }
  .ant-col::after {
    position: absolute;
    top: 10%;
    right: 0;
    content: '';
    display: inline-block;
    height: 80%;
    width: 1px;
    background: #e8e8e8;
  }
  .ant-col.noline::after {
    display: none;
  }
}

.app-log {
  font-size: 24px;
  font-weight: bold;
}
.app-box-outter {
  width: 100%;
  display: flex;
  justify-content: center;
}
.app-box-inner {
  width: 70vw;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  position: relative;
}
.menu-list {
  width: 70vw;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  background-color: red;
}
.menu-item {
  padding: 22px 10px;
  font-size: 16px;
  font-weight: 200;
  color: #ffffff;
  cursor: pointer;
}
.condition-box {
  width: 70vw;
}
.condition-all {
  padding: 3px 10px;
}
.condition-list {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  background-color: #ffffff;
}
.condition-item {
  display: flex;
  justify-content: flex-start;
  height: 40px;
  line-height: 40px;
  border-bottom: #f5f5f5 solid 1px;
}
.condition-label {
  width: 100px;
  padding-left: 10px;
}
.condition-value {
  display: flex;
  justify-content: flex-start;
}
.condition-value div {
  padding: 0px 10px;
}
.data-main {
  display: flex;
  justify-content: flex-start;

  padding-bottom: 15px;
}
.box-left {
  // width: 210px;
  background-color: #ffff;
  color: #000000;
  font-size: 16px;
  // min-width: 210px;
  // max-width: 210px;
  // height: 100%;
  // overflow:auto;
}
.ant-tree-switcher-line-icon {
  color: #ffffff !important;
}
.ant-tree li .ant-tree-node-content-wrapper {
  display: inline-block;
  height: 24px;
  margin: 0;
  padding: 0 5px;
  color: #ffffff;
  font-size: 14px;
  line-height: 24px;
  text-decoration: none;
  vertical-align: top;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s;
}
.box-right {
  background-color: #ffffff;
  font-size: 16px;
  position: relative;
  padding-bottom: 15px;
}
.main-top {
  display: flex;
  flex-wrap: wrap;
  > div {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  /deep/ .ant-input-group.ant-input-group-compact {
    width: 16vw;
    display: inline-block;
  }
}
.main-top > div > * {
  margin: 5px;
}
.allSelect {
  position: absolute;
  top: 15px;
  left: 0;
  /deep/ .ant-checkbox + span {
    padding: 0;
  }
}
.fixed-menu {
  position: fixed;
  right: 20px;
  z-index: 1;
  width: 80px;
  top: 172px;
}
.functionMould {
  background-color: #ffffff;
  padding: 10px;
  text-align: center;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px;
  cursor: pointer;
  &:hover {
    > span,
    > i {
      color: #146595;
    }
  }
}
.functionMould > span {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: #000000;
  display: block;
}
.menu-icon {
  font-size: 24px;
  color: #31a0e1;
}
.ant-tree-switcher {
  background: unset !important;
}

/deep/ .avatar-uploader .el-upload-list__item-status-label {
  display: none;
}
/deep/ .ant-form input[type='file'] {
  display: none;
}
/deep/ .ant-btn-primary {
  background: #4095e4;
  margin-right: 10px;
}
/deep/ .ant-btn-primary[disabled] {
  background-color: #f5f5f5;
}
/deep/ .ant-btn {
  // width: 85px;
  height: 30px;
  border-radius: 2px;
  margin: 2px;
  padding: 0 7px;
  span {
    margin-left: 2px;
  }
}

/deep/.trademarkInfoPopUp {
  .headerControl {
    text-align: right;
    margin-bottom: 10px;
  }
  .ant-modal-title {
    font-weight: 900;
  }
  .ant-modal-footer {
    text-align: center;
    padding: 20px;
  }
  .ant-modal-header {
    text-align: center;
  }
  .ant-descriptions-bordered .ant-descriptions-item-label {
    width: 170px;
    background-color: #d9dee8;
    border-bottom: 1px solid #f7f7f7;
  }
  .ant-descriptions-view {
    border-radius: unset;
  }
  .ant-table-thead > tr > th {
    background: #dadee9 !important;
    padding: 10px;
  }
  .ant-table-thead > tr:first-child > th:first-child,
  .ant-table table {
    border-radius: unset;
    line-height: 1;
  }

  .ant-table-thead > tr:first-child > th:first-child,
  .ant-table table {
    border-radius: unset;
    line-height: 1;
  }
  .ant-table-tbody .ant-table-row td {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}
/deep/ .productServicePopUp,
/deep/ .intellectualInfoPopUp,
/deep/.createTrademarkoPopUp {
  .ant-modal-title {
    font-weight: 900;
  }
  .ant-modal-header {
    text-align: center;
  }
  .ant-btn {
    width: fit-content;
  }
  .new-box {
    padding: 0 50px 20px;
  }
  .product-list {
    border: 1px solid #f5f5f5;
    border-radius: 3px;
    padding: 20px 50px;
    .product-name {
      margin-left: 20px;
    }
  }
  .ant-modal-footer {
    text-align: center;
    padding: 20px;
  }
  .btn {
    text-align: center;
    margin: 30px 0 0;
  }
  .ant-form-item {
    margin-bottom: 0;
  }
  .changeStyle .ant-form-item-label {
    line-height: unset;
    white-space: pre-wrap;
  }
  .upload-demo {
    /deep/ .ant-table-thead > tr > th {
      background: #d9dee8 !important;
    }
    /deep/.ant-table-thead > tr:first-child > th:first-child,
    /deep/ .ant-table table {
      border-radius: unset;
      line-height: 1;
    }
  }
}
/deep/ .selectKeywordPopUp {
  .ant-modal-title {
    font-weight: 900;
  }
  .ant-modal-header {
    text-align: center;
  }
  .ant-modal-footer {
    text-align: center;
    padding: 20px;
  }
}
/deep/ .processInforPopUp {
  .ant-modal-body {
    padding: 20px 75px;
  }
  .ant-timeline-item-head {
    background-color: #4095e4;
  }
  .ant-timeline-item-tail {
    border-left: 2px dotted #e8e8e8;
  }
  .processStep {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding: 0 10px;
    margin-top: 10px;
    .processTime {
      display: flex;
      font-weight: 700;
      span {
        display: inline-block;
        margin-right: 25px;
      }
    }
  }
}
/deep/ .mainTainPopUp,
/deep/ .selectAgencyPopUp,
/deep/.selectProposerPopUp,
/deep/ .selectServicePopUp,
/deep/ .productDetailPopUp {
  .ant-modal-title {
    color: #fff;
    font-weight: 900;
  }
  .ant-modal-body {
    padding: 24px 24px 0 24px;
  }
  .ant-input-group.ant-input-group-compact {
    display: flex;
    width: 40%;
  }
  .ant-modal-header {
    background: #388cdb;
    color: #fff;
    text-align: center;
  }
  .ant-modal-footer {
    text-align: center;
    padding: 20px;
  }
  .ant-btn-primary {
    background: #4095e4;
  }
  .ant-btn {
    width: 85px;
    height: 30px;
    border-radius: 2px;
    margin-right: 10px;
  }
  .ant-table-thead > tr > th {
    background: #dadee9 !important;
    padding: 10px;
  }
  .ant-table-thead > tr:first-child > th:first-child,
  .ant-table table {
    border-radius: unset;
    line-height: 1;
  }

  .ant-table-thead > tr:first-child > th:first-child,
  .ant-table table {
    border-radius: unset;
    line-height: 1;
  }
  .ant-table-tbody .ant-table-row td {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .headerControl {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
  }
  .selected-box {
    border: 1px solid #eeeeee;
    border-radius: 5px;
    padding: 0px 0 0 10px;
    .ant-select-selection {
      border: unset;
      border-left: 1px solid #eee;
      border-radius: unset;
      margin-left: 10px;
    }
  }
}
.toggleClick {
  background-color: #0581ca;
  border-bottom: 1px solid #1890ff;
  cursor: pointer;
}
.icon-plus {
  font-size: 13px;
  padding-right: 5px;
}
.main {
  min-height: 100%;
  background: #f5f5f5;

  position: relative;
}
.container {
  padding: 0 125px 100px;
  height: 100%;
  .trademark-nav {
    background: #fff;
    border-radius: 2px;
    border: solid 1px #e2e2e2;
    color: #000;
    -webkit-transition: max-height, margin-top 0.3s;
    transition: max-height, margin-top 0.3s;
    overflow: hidden;
    max-height: 700px;
    margin-top: 15px;
    .hoverShow {
      cursor: pointer;
      border-bottom: 3px solid rgba(255, 255, 255, 0);
      &:hover {
        border-bottom: 3px solid #31a0e1;
      }
    }
    .clickShow {
      border-bottom: 3px solid #31a0e1;
      color: #31a0e1;
      cursor: pointer;
    }
    .projec-class-box {
      font-weight: 600;
      // background: #f5f5f5;
      display: flex;
      border-bottom: 1px solid #f2f2f2;
      justify-content: center;
      align-items: center;
      &:last-of-type {
        border-bottom: none;
      }
      .projec-class-lable {
        width: 120px;
        padding: 10px 0 10px 30px;
        // float: left;
        font-size: 15px;
        text-align: left;
      }
      .projec-class-list {
        width: calc(100% - 120px);
        padding-left: 10px;
        color: rgba(0, 0, 0, 0.65);
        margin: 0;
        display: block;
        position: relative;
        padding: 0;
        list-style: none;
        li {
          float: left;
          padding: 10px 15px;
        }
      }
      &.projec-class-input {
        > div {
          flex: 1;
        }
        .projec-class-list {
          width: auto;
        }
      }
      .btn-more {
        display: none;
      }
      &.project-class-more {
        padding-right: 63px;
        position: relative;
        .btn-more {
          display: inline-block;
          position: absolute;
          right: 10px;
          top: 11px;
          padding: 0px 5px;
          cursor: pointer;
          color: #999;
          font-weight: normal;
          &:hover {
            color: #0581ca;
            background-color: #e4e4e4;
            .icon-child-down {
              color: #0581ca;
            }
          }
        }
        ul {
          -webkit-transition: all 0.3s;
          transition: all 0.3s;
          overflow: hidden;
          max-height: 700px;
          &.projec-class-list-more {
            max-height: 44px;
          }
        }
      }
    }
    &.trademark-nav-hidden {
      margin-top: 0;
      max-height: 0;
      border: 0;
    }
  }
  .trademark-tap {
    padding: 8px;
    width: 100%;
    text-align: center;
    color: #999;
    > span {
      padding: 5px;
      cursor: pointer;
      &:hover {
        color: #0581ca;
        background-color: #e4e4e4;
        .icon-child-down {
          color: #0581ca;
        }
      }
    }
  }
  .showTotal {
    vertical-align: middle;
  }
  .reservation-content {
    /deep/ .ant-table-body::-webkit-scrollbar-track {
      background: #fff;
    }
    margin-top: 20px;
    /deep/ .ant-table-small {
      border: unset;
      border-radius: unset;
    }
    /deep/ .ant-table-thead > tr > th {
      border: unset;
      border-radius: unset;
    }
    /deep/ .ant-table-thead {
      background-color: #d5dae4;
    }
    /deep/ .ant-table-small > .ant-table-content > .ant-table-body {
      margin: 0;
    }
  }
  .trademark-content {
    background: #fff;
    margin-top: 10px;
    border: 1px solid #ededed;
    .controlarea {
      padding: 15px 0 5px 10px;
    }
    .trademark-list {
      .reservation-content {
        margin-top: 20px;
        /deep/ .ant-table-small {
          border: unset;
          border-radius: unset;
        }
        /deep/ .ant-table-thead > tr > th {
          border: unset;
          border-radius: unset;
        }
        /deep/ .ant-table-thead {
          background-color: #f6f7f9;
        }
        /deep/ .ant-table-small > .ant-table-content > .ant-table-body {
          margin: 0;
        }
      }
    }
  }
}
/deep/ .ant-checkbox-group {
  width: calc(100% - 20px);
  margin: 0 10px;
}
/deep/ .ant-empty {
  margin: 20px;
}
@media (max-width: 1400px) {
  .trademark-nav {
    /deep/ input,
    /deep/ .ant-select {
      width: 152px !important;
    }
  }
}
@media all and (max-width: 1225px) {
  .projec-class-input {
    display: block !important;
    > div:not(:last-child) {
      border-bottom: 1px solid rgb(242, 242, 242);
    }
  }
}
@media (max-width: 1080px) {
  .container {
    padding: 0 30px 100px !important;
  }
}
.data-main .box-right .project-list .risk-list-hover {
  padding-right: 0;
}
.icon-child-down {
  font-size: 11px;
  margin-left: 3px;
  transition: all 0.3s;
  color: #999;
  &.icon-child-up {
    transform: rotate(180deg);
  }
}
/deep/ .ant-list * {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}
</style>
<style lang="less" scoped>
@import '~@assets/less/hte-main.less';

section {
  padding: 0;
  margin: 12px 0;
  background-color: #ffffff;
  border: solid 1px #e2e2e2;
  width: 100vw;
  .list-head {
    background-color: #ffffff;
    font-size: 14px;
    color: #333;
    padding: 7px 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .list-title {
    font-weight: bolder;
    margin-left: 15px;
    font-size: 16px;
    cursor: pointer;
  }
  .list-content {
    background-color: #fff;
    padding: 15px 18px 15px 50px;
    font-size: 14px;
    color: #666666;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
  }
  .list-content .left {
    display: flex;
    justify-content: flex-start;
    flex-direction: row;
  }
  .list-content .right {
    display: flex;
    justify-content: flex-start;
    flex-direction: row;
  }
  .list-content .left div {
    white-space: nowrap;
    margin-right: 10px;
  }
  .list-content .right div {
    white-space: nowrap;
    margin-left: 10px;
  }
}
.active1 {
  border: solid 1px #3168b1;
  background: #3168b1;
  color: white;
  font-weight: bold;
  border-top-left-radius: 10px;
  border-end-end-radius: 10px;
}

.active2 {
  color: #02a7f0;
  font-weight: bold;
}
.leftTree {
  font-size: 14px;
}
.leftTree div {
  height: 28px;
  line-height: 28px;
}
</style>
